package com.woniu.clientServer.controller;

import com.woniu.clientServer.dto.ApprovalDto;
import com.woniu.clientServer.service.ApprovalRecordService;
import com.woniu.common.utils.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/approval")
public class ApprovalRecordController {
    @Autowired
    private ApprovalRecordService approvalRecordService;

    @PostMapping("/doApproval")
    public ResponseData<?> doApproval(@RequestBody ApprovalDto approvalDto) {
        return approvalRecordService.doApproval(approvalDto);
    }
    @PostMapping("/rejectApproval")
    public ResponseData<?> rejectApproval(@RequestBody ApprovalDto approvalDto) {
        return approvalRecordService.rejectReason(approvalDto);
    }
}
